//
//  PSTransaction.h
//  PSExtensions
//
//  Created by PoiSon on 15/10/15.
//  Copyright © 2015年 yerl. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <PSExtensions/PSAspect.h>
NS_ASSUME_NONNULL_BEGIN
/**
 *  Transaction
 *  aspect a method using transaction like 
 *  [PSAspect enhanceSelector:@selector(trading) inClass:[Bank class] withInterceptor:[PSTransaction main]];
 */
@interface PSTransaction : NSObject<PSInterceptor>
+ (instancetype)use:(NSString *)configName;
+ (instancetype)main;
- (instancetype)initWithConfig:(NSString *)configName NS_DESIGNATED_INITIALIZER;
@end
NS_ASSUME_NONNULL_END